package com.patterns.mediator;

/**
 *  市场部
 * @author huangke
 *
 */
public class MarketDevelopment implements Department{
	
	private Mediator mediator;//持有中介者（总经理）的引用
	
	public MarketDevelopment(Mediator mediator) {
		this.mediator = mediator;
		mediator.register("market", this);//向中介者注册
	}

	public void selfAction() {
		System.out.println("市场部:拓展市场，给公司挣钱!");
	}

	public void outerAction() {
		System.out.println("市场部:客户说了，这个软件不好用!");
		this.mediator.command("development");
	}

}
